#define _CRT_SECURE_NO_WARNINGS  1


class Solution
{
public:
    int repeatedNTimes(vector<int>& nums)
    {
        unordered_map<int, int> m;
        for (auto e : nums)
        {
            m[e]++;
        }

        int ret = 0;
        for (auto e : m)
        {
            if (e.second > 1)
            {
                ret = e.first;
                break;
            }
        }
        return ret;
    }
};